package com.liruo.treasureattic.common.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.liruo.treasureattic.common.model.constant.TreasureAtticConstant;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * Can be the same level as folder
 * @TableName treasure_url
 */
@TableName(value ="ta_treasure_url")
@Data
public class TreasureUrl implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * folder_id  fid 不能是 1,因为id=1是保留的，不能有任何folder的id=1
     */
    private Long fid;

    /**
     * user_id
     */
    private Long uid;

    /**
     * max=128
     */
    private String name;
    /**
     * max=2048
     */
    private String url;
    /**
     * max=2048
     */
    private String ico;

    /**
     * o-no open
     * 1-open
     */
    private Boolean open;

    @TableLogic
    private Boolean deleted;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = TreasureAtticConstant.TREASURE_ATTIC_VERSION;
}